package com.woniu.service;

import com.woniu.entity.RbacRole;
import com.woniu.entity.ResponseEntity;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import java.util.Set;


/**
 * @author WenXin
 * @version 1.0
 * @description: TODO
 * @date 2022/9/2 16:53
 */
public interface RbacRoleService {
    @CachePut(value = "cachePutRole")
    ResponseEntity findAll(int pageNum, int pageSize);

    int addOne(RbacRole rbacRole);

    int deleteById(int id);

    int update(RbacRole rbacRole);

    ResponseEntity searchByRole(RbacRole rbacRole, int pageNum, int pageSize);

    @Cacheable(value = "cacheRole", key = "#username")
    Set<String> findOneByUserName(String username);

    ResponseEntity findAll();


}
